package com.mango.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mango.common.utils.PageUtils;
import com.mango.gulimall.product.entity.BrandEntity;
import com.mango.gulimall.product.entity.CategoryBrandRelationEntity;

import java.util.List;
import java.util.Map;

/**
 * Æ·ÅÆ·ÖÀà¹ØÁª
 *
 * @author mango
 * @email mango@gmail.com
 * @date 2021-02-07 23:40:28
 */
public interface CategoryBrandRelationService extends IService<CategoryBrandRelationEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /** 保存
     * @param categoryBrandRelation
     */
    void saveDetail(CategoryBrandRelationEntity categoryBrandRelation);

    /** 更新冗余字段
     * @param brandId
     * @param name
     */
    void updateBrand(Long brandId, String name);

    /**更新冗余字段
     * @param catId
     * @param name
     */
    void updateCategory(Long catId, String name);

    /** 查询指定分类中的所有品牌信息
     * @param catId
     * @return
     */
    List<BrandEntity> getBrandsByCatId(Long catId);
}

